using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Zonal
{
    /// <summary>
    /// <para>Zonal Geometry as Table</para>
    /// <para>Calculates the geometry measures (area, perimeter, thickness, and the characteristics of ellipse) for each zone in a dataset and reports the results as a table.</para>
    /// <para>计算数据集中每个区域的几何测量值（面积、周长、厚度和椭圆特征），并将结果报告为表格。</para>
    /// </summary>    
    [DisplayName("Zonal Geometry as Table")]
    public class ZonalGeometryAsTable : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ZonalGeometryAsTable()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_zone_data">
        /// <para>Input raster or feature zone data</para>
        /// <para><xdoc>
        ///   <para>The dataset that defines the zones.</para>
        ///   <para>The zones can be defined by an integer raster or a feature layer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义区域的数据集。</para>
        ///   <para>区域可由整数栅格或要素图层定义。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_zone_field">
        /// <para>Zone field</para>
        /// <para><xdoc>
        ///   <para>The field that contains the values that define each zone.</para>
        ///   <para>It must be an integer field of the zone dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含定义每个区域的值的字段。</para>
        ///   <para>它必须是区域数据集的整数字段。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output table</para>
        /// <para><xdoc>
        ///   <para>Output table that will contain the summary of the values in each zone.</para>
        ///   <para>The format of the table is determined by the output location and path. By default, the output will be a geodatabase table. If the path is not in a geodatabase, the format is determined by the extension. If the extension is .dbf, it will be in dBASE format. If no extension is specified, the output will be an INFO table. Note that INFO tables are not supported as input in ArcGIS Pro and cannot be displayed.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出表，将包含每个区域中值的摘要。</para>
        ///   <para>表的格式由输出位置和路径决定。默认情况下，输出将为地理数据库表。如果路径不在地理数据库中，则格式由扩展模块确定。如果扩展名为 .dbf，则采用 dBASE 格式。如果未指定扩展名，则输出将为 INFO 表。请注意，ArcGIS Pro 不支持将 INFO 表作为输入，因此无法显示。</para>
        /// </xdoc></para>
        /// </param>
        public ZonalGeometryAsTable(object _in_zone_data, object _zone_field, object _out_table)
        {
            this._in_zone_data = _in_zone_data;
            this._zone_field = _zone_field;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Zonal Geometry as Table";

        public override string CallName => "sa.ZonalGeometryAsTable";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "qualifiedFieldNames", "scratchWorkspace", "snapRaster", "tileSize", "transferDomains", "workspace"];

        public override object[] ParameterInfo => [_in_zone_data, _zone_field, _out_table, _processing_cell_size];

        /// <summary>
        /// <para>Input raster or feature zone data</para>
        /// <para><xdoc>
        ///   <para>The dataset that defines the zones.</para>
        ///   <para>The zones can be defined by an integer raster or a feature layer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义区域的数据集。</para>
        ///   <para>区域可由整数栅格或要素图层定义。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or feature zone data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_zone_data { get; set; }


        /// <summary>
        /// <para>Zone field</para>
        /// <para><xdoc>
        ///   <para>The field that contains the values that define each zone.</para>
        ///   <para>It must be an integer field of the zone dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含定义每个区域的值的字段。</para>
        ///   <para>它必须是区域数据集的整数字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Zone field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _zone_field { get; set; }


        /// <summary>
        /// <para>Output table</para>
        /// <para><xdoc>
        ///   <para>Output table that will contain the summary of the values in each zone.</para>
        ///   <para>The format of the table is determined by the output location and path. By default, the output will be a geodatabase table. If the path is not in a geodatabase, the format is determined by the extension. If the extension is .dbf, it will be in dBASE format. If no extension is specified, the output will be an INFO table. Note that INFO tables are not supported as input in ArcGIS Pro and cannot be displayed.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出表，将包含每个区域中值的摘要。</para>
        ///   <para>表的格式由输出位置和路径决定。默认情况下，输出将为地理数据库表。如果路径不在地理数据库中，则格式由扩展模块确定。如果扩展名为 .dbf，则采用 dBASE 格式。如果未指定扩展名，则输出将为 INFO 表。请注意，ArcGIS Pro 不支持将 INFO 表作为输入，因此无法显示。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Processing cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size of the output raster that will be created.</para>
        ///   <para>This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, the environment cell size value will be used if specified; otherwise, additional rules will be used to calculate it from the other inputs. See the usage section for more detail.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的输出栅格的像元大小。</para>
        ///   <para>此参数可以由数值定义，也可以从现有栅格数据集中获取。如果尚未将像元大小显式指定为参数值，则在指定的情况下将使用环境像元大小值;否则，将使用其他规则从其他输入计算它。有关详细信息，请参阅用法部分。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _processing_cell_size { get; set; } = null;


        public ZonalGeometryAsTable SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, bool? transferDomains = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, transferDomains: transferDomains, workspace: workspace);
            return this;
        }

    }

}